#pragma once

#include <iostream>

class Strategy
{
public:
    Strategy(void)          = default;
    virtual ~Strategy(void) = default;

public:
    virtual void Operator(void) = 0;
};

class CContext
{
public:
    CContext(Strategy *pStrategy)
    {
        m_pStrategy = pStrategy;
    }
    ~CContext()
    {
        delete m_pStrategy;
    }

public:
    void Operator()
    {
        m_pStrategy->Operator();
    }

private:
    Strategy *m_pStrategy;
};

class StrategyA : public Strategy
{
public:
    StrategyA(void){};
    ~StrategyA(void){};

public:
    void Operator(void)
    {
        std::cout << "A" << std::endl;
    };
};

class StrategyB : public Strategy
{
public:
    StrategyB(void){};
    ~StrategyB(void){};

public:
    void Operator(void)
    {
        std::cout << "B" << std::endl;
    };
};

class StrategyC : public Strategy
{
public:
    StrategyC(){};
    ~StrategyC(){};

public:
    void Operator()
    {
        std::cout << "C" << std::endl;
    };
};
